<?php
/**
  * Mar 4, 2008
  *
  * Coded by: Ropu
  *
  */

require_once('classes/dao/openSocialDAO.php');
class OpenSocial {
  protected $id;
  protected $network;
  protected $date;
  
  public function __construct($id, $network, $date=null) {
    $this->id = $id;
    $this->network = $network;
    $this->date = $date;
  }
  
  public function getId() {
    return $this->id;
  }
  
  public function getNetwork() {
    return $this->network;
  }
  
  public function getHacker() {
    try {
      $hacker_id = OpenSocialDAO::getHacker($this);
    } catch (Exception $e) {
      return null;
    }
    $hacker = new Hacker($hacker_id);
    return $hacker;
  }
}